<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>NMQJ: TiXmlDocument Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">NMQJ
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">TiXmlDocument Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="TiXmlDocument" --><!-- doxytag: inherits="TiXmlNode" -->
<p><code>#include &lt;<a class="el" href="tinyxml_8h_source.html">tinyxml.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for TiXmlDocument:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classTiXmlDocument.png" usemap="#TiXmlDocument_map" alt=""/>
  <map id="TiXmlDocument_map" name="TiXmlDocument_map">
<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,99,80"/>
<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,99,24"/>
</map>
 </div></div>

<p><a href="classTiXmlDocument-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f5e84335708fde98400230f9f12659c"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="a9f5e84335708fde98400230f9f12659c" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a9f5e84335708fde98400230f9f12659c">TiXmlDocument</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty document, that has no name. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4508b452d0c3061db085f3db27b8396"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="ae4508b452d0c3061db085f3db27b8396" args="(const char *documentName)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ae4508b452d0c3061db085f3db27b8396">TiXmlDocument</a> (const char *documentName)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a document with a name. The name of the document is also the filename of the xml. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c6e58fb99bfa76cc613f16840022225"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="a2c6e58fb99bfa76cc613f16840022225" args="(const std::string &amp;documentName)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a2c6e58fb99bfa76cc613f16840022225">TiXmlDocument</a> (const std::string &amp;documentName)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a323a7486e7da6099cdc19a5ff7e74b07"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="a323a7486e7da6099cdc19a5ff7e74b07" args="(const TiXmlDocument &amp;copy)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>TiXmlDocument</b> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;copy)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe9b90aff3a380764243dc39e533bfe6"></a><!-- doxytag: member="TiXmlDocument::operator=" ref="afe9b90aff3a380764243dc39e533bfe6" args="(const TiXmlDocument &amp;copy)" -->
<a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;copy)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f">LoadFile</a> (TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21c0aeb0d0a720169ad4ac89523ebe93"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="a21c0aeb0d0a720169ad4ac89523ebe93" args="() const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a file using the current document value. Returns true if successful. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a879cdf5e981b8b2d2ef82f2546dd28fb"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a879cdf5e981b8b2d2ef82f2546dd28fb" args="(const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a879cdf5e981b8b2d2ef82f2546dd28fb">LoadFile</a> (const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Load a file using the given filename. Returns true if successful. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae869f5ebf7fc54c4a1d737fb4689fd44"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="ae869f5ebf7fc54c4a1d737fb4689fd44" args="(const char *filename) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ae869f5ebf7fc54c4a1d737fb4689fd44">SaveFile</a> (const char *filename) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a file using the given filename. Returns true if successful. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a41f6fe7200864d1dca663d230caf8db6">LoadFile</a> (FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acf1672b4538c6d1d441f9f108aea2bf4"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="acf1672b4538c6d1d441f9f108aea2bf4" args="(FILE *) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#acf1672b4538c6d1d441f9f108aea2bf4">SaveFile</a> (FILE *) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Save a file using the given FILE*. Returns true if successful. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a18ae6ed34fed7991ebc220862dfac884">LoadFile</a> (const std::string &amp;filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3d4fae0463f3f03679ba0b7cf6f2df52"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="a3d4fae0463f3f03679ba0b7cf6f2df52" args="(const std::string &amp;filename) const " -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a3d4fae0463f3f03679ba0b7cf6f2df52">SaveFile</a> (const std::string &amp;filename) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">&lt; STL std::string version. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378">Parse</a> (const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be">RootElement</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b43e762a23f938b06651bc90b8a1013"></a><!-- doxytag: member="TiXmlDocument::RootElement" ref="a0b43e762a23f938b06651bc90b8a1013" args="()" -->
<a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>RootElement</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29">Error</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d0f689f6e09ea494ea547be8d79c25e"></a><!-- doxytag: member="TiXmlDocument::ErrorDesc" ref="a9d0f689f6e09ea494ea547be8d79c25e" args="() const " -->
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Contains a textual (english) description of the error if one occurs. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">ErrorId</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">ErrorRow</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa90bc630ee5203c6109ca5fad3323649"></a><!-- doxytag: member="TiXmlDocument::ErrorCol" ref="aa90bc630ee5203c6109ca5fad3323649" args="() const " -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649">ErrorCol</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The column where the error occured. See <a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a> <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a> (int _tabsize)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a612360241b85bad0826b2a9ae9cda561"></a><!-- doxytag: member="TiXmlDocument::TabSize" ref="a612360241b85bad0826b2a9ae9cda561" args="() const " -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>TabSize</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35">ClearError</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510">Print</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8701fda1fa31b25abbc9c0df42da10e8"></a><!-- doxytag: member="TiXmlDocument::Print" ref="a8701fda1fa31b25abbc9c0df42da10e8" args="(FILE *cfile, int depth=0) const " -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a8701fda1fa31b25abbc9c0df42da10e8">Print</a> (FILE *cfile, int depth=0) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Print this Document to a FILE stream. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a735c23e318597b920c94eae77fa206de"></a><!-- doxytag: member="TiXmlDocument::SetError" ref="a735c23e318597b920c94eae77fa206de" args="(int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetError</b> (int err, const char *errorLocation, TiXmlParsingData *prevData, TiXmlEncoding encoding)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1dc977bde3e4fe85a8eb9d88a35ef5a4"></a><!-- doxytag: member="TiXmlDocument::ToDocument" ref="a1dc977bde3e4fe85a8eb9d88a35ef5a4" args="() const " -->
virtual const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a1dc977bde3e4fe85a8eb9d88a35ef5a4">ToDocument</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1025d942a1f328fd742d545e37efdd42"></a><!-- doxytag: member="TiXmlDocument::ToDocument" ref="a1025d942a1f328fd742d545e37efdd42" args="()" -->
virtual <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a1025d942a1f328fd742d545e37efdd42">ToDocument</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *content) const </td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907">Clone</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6d70b2c19e46aedb9903b3c3aa2a568"></a><!-- doxytag: member="TiXmlDocument::StreamIn" ref="ab6d70b2c19e46aedb9903b3c3aa2a568" args="(std::istream *in, TIXML_STRING *tag)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>StreamIn</b> (std::istream *in, TIXML_STRING *tag)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Always the top level node. A document binds together all the XML pieces. It can be saved, loaded, and printed to the screen. The 'value' of a document node is the xml file name. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa545aae325d9752ad64120bc4ecf939a"></a><!-- doxytag: member="TiXmlDocument::Accept" ref="aa545aae325d9752ad64120bc4ecf939a" args="(TiXmlVisitor *content) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classTiXmlDocument.html#aa545aae325d9752ad64120bc4ecf939a">TiXmlDocument::Accept</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *&#160;</td>
          <td class="paramname"><em>content</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Walk the XML tree visiting this node and all of its children. </p>

<p>Implements <a class="el" href="classTiXmlNode.html#acc0f88b7462c6cb73809d410a4f5bb86">TiXmlNode</a>.</p>

</div>
</div>
<a class="anchor" id="ac66b8c28db86363315712a3574e87c35"></a><!-- doxytag: member="TiXmlDocument::ClearError" ref="ac66b8c28db86363315712a3574e87c35" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classTiXmlDocument.html#ac66b8c28db86363315712a3574e87c35">TiXmlDocument::ClearError</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>If you have handled the error, it can be reset with this call. The error state is automatically cleared if you Parse a new XML block. </p>

</div>
</div>
<a class="anchor" id="a4968661cab4a1f44a23329c6f8db1907"></a><!-- doxytag: member="TiXmlDocument::Clone" ref="a4968661cab4a1f44a23329c6f8db1907" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* <a class="el" href="classTiXmlDocument.html#a4968661cab4a1f44a23329c6f8db1907">TiXmlDocument::Clone</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create an exact duplicate of this node and return it. The memory must be deleted by the caller. </p>

<p>Implements <a class="el" href="classTiXmlNode.html#a4508cc3a2d7a98e96a54cc09c37a78a4">TiXmlNode</a>.</p>

</div>
</div>
<a class="anchor" id="a6dfc01a6e5d58e56acd537dfd3bdeb29"></a><!-- doxytag: member="TiXmlDocument::Error" ref="a6dfc01a6e5d58e56acd537dfd3bdeb29" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classTiXmlDocument.html#a6dfc01a6e5d58e56acd537dfd3bdeb29">TiXmlDocument::Error</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>If an error occurs, Error will be set to true. Also,</p>
<ul>
<li>The <a class="el" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">ErrorId()</a> will contain the integer identifier of the error (not generally useful)</li>
<li>The <a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc()</a> method will return the name of the error. (very useful)</li>
<li>The <a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow()">ErrorCol()</a> will return the location of the error (if known) </li>
</ul>

</div>
</div>
<a class="anchor" id="af96fc2f3f9ec6422782bfe916c9e778f"></a><!-- doxytag: member="TiXmlDocument::ErrorId" ref="af96fc2f3f9ec6422782bfe916c9e778f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classTiXmlDocument.html#af96fc2f3f9ec6422782bfe916c9e778f">TiXmlDocument::ErrorId</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Generally, you probably want the error string ( <a class="el" href="classTiXmlDocument.html#a9d0f689f6e09ea494ea547be8d79c25e" title="Contains a textual (english) description of the error if one occurs.">ErrorDesc()</a> ). But if you prefer the ErrorId, this function will fetch it. </p>

</div>
</div>
<a class="anchor" id="af30efc75e804aa2e92fb8be3a8cb676e"></a><!-- doxytag: member="TiXmlDocument::ErrorRow" ref="af30efc75e804aa2e92fb8be3a8cb676e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">TiXmlDocument::ErrorRow</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the location (if known) of the error. The first column is column 1, and the first row is row 1. A value of 0 means the row and column wasn't applicable (memory errors, for example, have no row/column) or the parser lost the error. (An error in the error reporting, in that case.)</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a>, <a class="el" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853">Row</a>, <a class="el" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003" title="See Row()">Column</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4c852a889c02cf251117fd1d9fe1845f"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a4c852a889c02cf251117fd1d9fe1845f" args="(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f">TiXmlDocument::LoadFile</a> </td>
          <td>(</td>
          <td class="paramtype">TiXmlEncoding&#160;</td>
          <td class="paramname"><em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Load a file using the current document value. Returns true if successful. Will delete any existing document data before loading. </p>

</div>
</div>
<a class="anchor" id="a41f6fe7200864d1dca663d230caf8db6"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a41f6fe7200864d1dca663d230caf8db6" args="(FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f">TiXmlDocument::LoadFile</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TiXmlEncoding&#160;</td>
          <td class="paramname"><em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Load a file using the given FILE*. Returns true if successful. Note that this method doesn't stream - the entire object pointed at by the FILE* will be interpreted as an XML file. TinyXML doesn't stream in XML from the current file location. Streaming may be added in the future. </p>

</div>
</div>
<a class="anchor" id="a18ae6ed34fed7991ebc220862dfac884"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="a18ae6ed34fed7991ebc220862dfac884" args="(const std::string &amp;filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classTiXmlDocument.html#a4c852a889c02cf251117fd1d9fe1845f">TiXmlDocument::LoadFile</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TiXmlEncoding&#160;</td>
          <td class="paramname"><em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">encoding</td><td>STL std::string version. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a17ebabe36926ef398e78dec0d0ad0378"></a><!-- doxytag: member="TiXmlDocument::Parse" ref="a17ebabe36926ef398e78dec0d0ad0378" args="(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* <a class="el" href="classTiXmlDocument.html#a17ebabe36926ef398e78dec0d0ad0378">TiXmlDocument::Parse</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TiXmlParsingData *&#160;</td>
          <td class="paramname"><em>data</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TiXmlEncoding&#160;</td>
          <td class="paramname"><em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parse the given null terminated block of xml data. Passing in an encoding to this method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml to use that encoding, regardless of what TinyXml might otherwise try to detect. </p>

<p>Implements <a class="el" href="classTiXmlBase.html">TiXmlBase</a>.</p>

</div>
</div>
<a class="anchor" id="af08389ec70ee9b2de7f800e206a18510"></a><!-- doxytag: member="TiXmlDocument::Print" ref="af08389ec70ee9b2de7f800e206a18510" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classTiXmlDocument.html#af08389ec70ee9b2de7f800e206a18510">TiXmlDocument::Print</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Write the document to standard out using formatted printing ("pretty print"). </p>

</div>
</div>
<a class="anchor" id="ad09d17927f908f40efb406af2fb873be"></a><!-- doxytag: member="TiXmlDocument::RootElement" ref="ad09d17927f908f40efb406af2fb873be" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* <a class="el" href="classTiXmlDocument.html#ad09d17927f908f40efb406af2fb873be">TiXmlDocument::RootElement</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the root element -- the only top level element -- of the document. In well formed XML, there should only be one. TinyXml is tolerant of multiple elements at the document level. </p>

</div>
</div>
<a class="anchor" id="a51dac56316f89b35bdb7d0d433ba988e"></a><!-- doxytag: member="TiXmlDocument::SetTabSize" ref="a51dac56316f89b35bdb7d0d433ba988e" args="(int _tabsize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">TiXmlDocument::SetTabSize</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>_tabsize</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p><a class="el" href="classTiXmlDocument.html#a51dac56316f89b35bdb7d0d433ba988e">SetTabSize()</a> allows the error reporting functions (<a class="el" href="classTiXmlDocument.html#af30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#aa90bc630ee5203c6109ca5fad3323649" title="The column where the error occured. See ErrorRow()">ErrorCol()</a>) to report the correct values for row and column. It does not change the output or input in any way.</p>
<p>By calling this method, with a tab size greater than 0, the row and column of each node and attribute is stored when the file is loaded. Very useful for tracking the DOM back in to the source file.</p>
<p>The tab size is required for calculating the location of nodes. If not set, the default of 4 is used. The tabsize is set per document. Setting the tabsize to 0 disables row/column tracking.</p>
<p>Note that row and column tracking is not supported when using operator&gt;&gt;.</p>
<p>The tab size needs to be enabled before the parse or load. Correct usage: </p>
<div class="fragment"><pre class="fragment">
		TiXmlDocument doc;
		doc.SetTabSize( 8 );
		doc.Load( "myfile.xml" );
		</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlBase.html#a024bceb070188df92c2a8d8852dd0853">Row</a>, <a class="el" href="classTiXmlBase.html#ab54bfb9b70fe6dd276e7b279cab7f003" title="See Row()">Column</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/<a class="el" href="tinyxml_8h_source.html">tinyxml.h</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Fri Sep 21 2012 11:15:50 for NMQJ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
